<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">



<ui:composition template="/template/template.xhtml">


	<ui:define name="conteudo">
			<center>
			<p:panel header="Register New Account" style="width:600px;">
			<h:form class="novaconta">
			
			<p:growl autoUpdate="true" life="3000" showDetail="false"/>
	  		<h:panelGrid columns="2">
	  			<h:outputText value="User name: " />
	            <p:inputText value="#{novaContaBean.account.username}" required="true" placeholder="Enter your name" requiredMessage="Preencha seu Login!" />
	            <h:outputText value="Password: "/>
	            <p:password value="#{novaContaBean.account.password}" required="true" placeholder="Enter your password" requiredMessage="Preencha sua Senha!" />
	            <h:outputText value="Repeat password: "/>
	            <p:password value="#{novaContaBean.repitaSenha}" required="true" placeholder="Repeat password" requiredMessage="Repita a sua Senha!"/>
		  		<h:outputText value="First name: "/>
	            <p:inputText value="#{novaContaBean.customer.first_name}" required="true" placeholder="Enter your first name" requiredMessage="Informe seu primeiro nome!"/>
		  		
		  		<h:outputText value="Last name: "/>
	            <p:inputText value="#{novaContaBean.customer.last_name}" required="true" placeholder="Enter your last name" requiredMessage="Informe seu ultimo nome!"/>
		  		
		  		<h:outputText value="Email: "/>
	            <p:inputText value="#{novaContaBean.customer.email_address}" required="true" placeholder="Enter your e-mail" requiredMessage="Informe seu email!"/>
		  		
	  		
	  			<h:outputText value="Address : "/>
	            <p:inputText value="#{novaContaBean.contact.address_line_1}" placeholder="Enter your address"/>
		  		
		  		      	
	  		    <h:outputText value="City : "/>
	            <p:inputText value="#{novaContaBean.contact.city}" placeholder="Enter your city"/>
	            
	            <h:outputText value="State : "/>
	            <p:inputText value="#{novaContaBean.contact.state}" placeholder="Enter your state"/>
	            
	            <h:outputText value="Zip : "/>
	            <p:inputText value="#{novaContaBean.contact.zip}" placeholder="Enter your zip"/>
	            
	            <h:outputText value="Country : "/>
	            <p:inputText value="#{novaContaBean.contact.country}" placeholder="Enter your country"/>
	      	</h:panelGrid>
		  	<br/>
		  		<p:commandButton value="Save" action="#{novaContaBean.novaConta}"></p:commandButton>
			</h:form>
			</p:panel>
			
		</center>
	</ui:define>
	
	
	
</ui:composition>
</html>